package www.hz.test.infrastructure;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.SqlSessionFactory;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;
import www.hz.Application;
import www.hz.infrastructure.dao.IAward;
import www.hz.infrastructure.dao.po.Award;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
class AwardDaoTest {
   @Autowired
     private IAward awardDao;
    @Autowired
    private SqlSessionFactory sqlSessionFactory;

    @Test
    public void test() {
    List<Award> awards = awardDao.queryAwardList();
    log.info("测试结果：{}", JSON.toJSONString(awards));

    }
}
